home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-08-26 | 6.4 KB | 303 lines | [mlts/slnk] |
- ! "Dataplex DPX 496 14/7/92" gtw
- ! based on JFK’s “Telebit 3000” script
- ! and ISL's “Zoom TurboModem” script.
- !
- ! 14/07/92 gtw - Started
- !
- ! Cable needed for the Telebit T3000.
- ! Din-8 DB-25
- ! 1 (DTR) 4,20 (RTS, DTR)
- ! 2 (CTS) 5 (CTS) ** Note, normally 2(CTS)->6 (DSR) on other mac cables.
- ! 3 (TxD-) 2 (TD)
- ! 4 (SG) 7 (SG)
- ! 5 (RxD-) 3 (RD)
- ! 6 (TxD+) Not Connected
- ! 7 (GPi) 8 (DCD)
- ! 8 (RxD+) 7 (SG)
- !
- @ORIGINATE
- @ANSWER
- !
- ! Talk to the modem at 19,200 bps. the T3000 should auto-baud this
- ! unless the user has locked the port to a particular speed. If it
- ! is locked to a different speed, the user will need to change that.
- !
- serreset 19200, 0, 8, 1
- hsreset 0 1 0 0 0 0
- !setspeed 1440
- !
- ! First recall the factory configuration
- ! F is the built in preconfigured setting for CTS/RTS handshaking.
- ! Since it's possible for the user to modify F0 parameters, this is a
- ! little safer.
- !
- ! AT &F &C1 &K2 &D2 sets:
- ! &C1 - DCD follows state of the remote data carrier
- ! &K2 - Enable RTS/CTS flow control, XON-XOFF ignored
- ! &R2 - CTS tracks RTS
- ! &D2 - DTR on/off disconnects
- !
- settries 0
- matchclr
- @LABEL 1
- matchstr 1 2 "OK\13\10"
- write "AT &F &C1 &K2 &D2\13"
- matchread 30
- inctries
- iftries 2 119
- ! Modem is not responding, reset and send a break
- DTRClear
- pause 5
- DTRSet
- SBreak
- jump 1
- !
- ! Next, Set up the configuration: drop connection after losing DTR
- ! Turn off auto answer and command echo.
- !
- ! &D3 - DTR on/off resets modem
- ! S0=0 - Don't answer calls
- ! E0 - Turn command echo off
- !
- @LABEL 2
- matchclr
- pause 5
- matchstr 1 3 "OK\13\10"
- write "AT &D3 S0=0 E0\13"
- matchread 30
- jump 119
- !
- ! Next, disable MNP and error control
- ! turn on internal buffering (for V.32bis),
- ! and extended result codes
- ! CTS/RTS flow control was set when we
- ! issued &K2, so we don't need to do it here.
- !
- ! &E0 - Turn off all error detection/correction (ARA does MNP and
- ! compression itself. It needs these turned off in the modem).
- ! *E0 - Kill compression.
- ! %V0 - Turn on trellis encoding
- ! %H3 - Attempt a turbo conenction, then try all others in descending order
- ! V1 - Issue extended result codes. This will display busy, connect XXX, etc.
- ! The modem will say "CARRIER XXX" Where XXX is the line speed (as opposed to
- ! DTE speed). We need this so we can tell ARA what speed we are really
- ! communicating at (for timing).
- !
- @LABEL 3
- pause 5
- matchstr 1 4 "OK\13\10"
- write "AT *E0 %V0 %H3 V1\13"
- matchread 30
- jump 119
- !
- ! If speaker on flag is true, jump to label 8. Else turn off the speaker
- !
- @LABEL 4
- ifstr 2 5 "1"
- pause 5
- matchstr 1 5 "OK\13\10"
- write "AT M0 \13"
- matchread 30
- jump 119
- !
- ! The modem is ready so enable answering, or originate a call
- !
- @LABEL 5
- pause 5
- ifANSWER 30
- note "Dialing ^1" 3
- write "ATDP^1\13"
- !
- @LABEL 6
- matchstr 1 51 "CONNECT 1200\13\10"
- matchstr 2 52 "CONNECT 2400\13\10"
- matchstr 3 53 "CONNECT 4800\13\10"
- matchstr 4 54 "CONNECT 7200\13\10"
- matchstr 5 55 "CONNECT 9600\13\10"
- matchstr 6 56 "CONNECT 12000\13\10"
- matchstr 7 57 "CONNECT 14400\13\10"
- matchstr 8 58 "CONNECT 19200\13\10"
- matchstr 9 121 "NO CARRIER\13\10"
- matchstr 10 121 "ERROR\13\10"
- matchstr 11 120 "NO DIALTONE\13\10"
- matchstr 12 122 "BUSY\13\10"
- matchstr 13 123 "NO ANSWER\13\10"
- matchstr 14 122 "BLACKLIST\13\10"
- matchstr 15 122 "FORBIDDEN CALL\13\10"
- matchread 700
- jump 119
- !
- ! Notice that all we do for different connect speeds is issue a
- ! "CommunicatingAt" command. Remember, we locked the interface speed
- ! to 14,400 bps so we don't want to reset the serial speed after we connect.
- ! CommuicatingAt tells ARA what the actual line speed is so that it
- ! can set it's timers appropriately. I guess your performance would be
- ! sub-optimal if you don't set this...
- !
- @LABEL 51
- note "Communicating at 1200 bps." 2
- CommunicatingAt 1200
- jump 15
- !
- @LABEL 52
- note "Communicating at 2400 bps." 2
- CommunicatingAt 2400
- jump 15
- !
- @LABEL 53
- note "Communicating at 4800 bps." 2
- CommunicatingAt 4800
- jump 15
- !
- @LABEL 54
- note "Communicating at 7200 bps." 2
- CommunicatingAt 7200
- jump 15
- !
- @LABEL 55
- note "Communicating at 9600 bps." 2
- CommunicatingAt 9600
- jump 15
- !
- @LABEL 56
- note "Communicating at 12000 bps." 2
- CommunicatingAt 12000
- jump 15
- !
- @LABEL 57
- note "Communicating at 14400 bps." 2
- CommunicatingAt 14400
- jump 15
- !
- @LABEL 58
- note "Communicating at 19200 bps." 2
- CommunicatingAt 19200
- jump 15
- !
- ! Set CTS handshaking ON in the serial port (that's the 1 in the HSReset
- ! command below )
- !
- @LABEL 15
- HSReset 0 1 0 0 0 0
- ifANSWER 16
- pause 30
- @LABEL 16
- exit 0
- !
- ! @ANSWER
- ! Set up the modem to answer
- !
- @LABEL 30
- write "ATS0=1\13"
- matchstr 1 31 "OK\13\10"
- matchread 30
- jump 119
- !
- @LABEL 31
- matchstr 1 32 "RING\13\10"
- matchstr 1 51 "CONNECT 1200\13\10"
- matchstr 2 52 "CONNECT 2400\13\10"
- matchstr 3 53 "CONNECT 4800\13\10"
- matchstr 4 54 "CONNECT 7200\13\10"
- matchstr 5 55 "CONNECT 9600\13\10"
- matchstr 6 56 "CONNECT 12000\13\10"
- matchstr 7 57 "CONNECT 14400\13\10"
- matchstr 8 58 "CONNECT 19200\13\10"
- matchstr 9 121 "NO CARRIER\13\10"
- matchstr 10 121 "ERROR\13\10"
- matchstr 11 120 "NO DIALTONE\13\10"
- matchstr 12 122 "BUSY\13\10"
- matchstr 13 123 "NO ANSWER\13\10"
- matchstr 14 122 "BLACKLIST\13\10"
- matchstr 15 122 "FORBIDDEN CALL\13\10"
- matchread 700
- jump 31
- !
- @LABEL 32
- userhook 1
- note "Answering phone..." 2
- jump 31
- !
- ! 50: error messages
- !
- @LABEL 119
- exit -6019
- !
- @LABEL 120
- exit -6020
- !
- @LABEL 121
- exit -6021
- !
- @LABEL 122
- exit -6022
- !
- @LABEL 123
- exit -6023
- !
- ! Hang up the modem
- !
- @HANGUP
- @LABEL 60
- settries 0
- @LABEL 61
- matchclr
- matchstr 1 63 "NO CARRIER\13\10"
- matchstr 2 63 "OK\13\10"
- matchstr 3 63 "ERROR\13\10"
- write "ATH\13"
- matchread 30
- inctries
- iftries 3 63
- ! no response, try escape sequence
- matchclr
- matchstr 1 62 "OK\13\10"
- write "+++"
- matchread 15
- !
- ! No Response from modem, toggle DTR
- !
- DTRClear
- pause 5
- DTRSet
- jump 61
- !
- @LABEL 62
- ! Pause 1 second before to ensure we meet the escape time delay
- pause 10
- Flush
- matchstr 1 63 "OK\13\10"
- matchstr 2 63 "NO CARRIER\13\10"
- matchstr 3 63 "ERROR\13\10"
- write "ATH\13"
- matchread 30
- jump 61
- !
- !
- ! recall the factory settings. Use &F &C1 &K2 &D2 again (see note at top of script)
- !
- @LABEL 63
- matchclr
- matchstr 1 64 "OK\13\10"
- pause 15
- write "AT &F &C1 &K2 &D2\13"
- matchread 30
- !
- ! Turn off auto answer, set S51 so modem will check interface
- ! speed on next connection. If you don't do this, the modem
- ! will not try to autobaud, with the result being it exits the
- ! script with an error
- !
- ! \\N3 %C1 S48=7 - Negotiate conenction
- ! S0=0 - Don't try to answer the phone
- !
- @LABEL 64
- pause 5
- matchstr 1 65 "OK\13\10"
- write "AT S0=0\13"
- matchread 20
- !
- @LABEL 65
- exit 0
-
-